package com.kiln.juxingqs.adapter

import androidx.recyclerview.widget.DiffUtil
import client.global.commlib.base.BasePagingAdapter
import client.global.commlib.base.PagingViewHoder
import com.kiln.juxingqs.R
import com.kiln.juxingqs.api.bean.Wdtj
import com.kiln.juxingqs.databinding.LayoutWdtjitemBinding

class WdtjAdapter :
    BasePagingAdapter<Wdtj.Json>(object : DiffUtil.ItemCallback<Wdtj.Json>() {
        override fun areItemsTheSame(
            oldItem: Wdtj.Json,
            newItem: Wdtj.Json
        ): Boolean {
            return false
        }

        override fun areContentsTheSame(
            oldItem: Wdtj.Json,
            newItem: Wdtj.Json
        ): Boolean {
            return oldItem == newItem
        }
    }) {


    override fun bindItem(holder: PagingViewHoder, t: Any) {
        val binding = holder.binding as LayoutWdtjitemBinding
        val bean = t as Wdtj.Json
        binding.bean = bean
    }

    override fun getItemLayout(): Int {
        return R.layout.layout_wdtjitem
    }
}